From: Marco Trevisan (TreviƱo) Date: Fri, 3 May 2019 20:30:42 +0000 (-0500) Subject: dialog: Use object's set to assign properties X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~227 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2e5295b3a9dbcdbfd4a67f787b059c4e11ac9a1c;p=gnome-shell.git dialog: Use object's set to assign properties We can just assign a properties object to a GObject using the set() method instead of using Object.assign. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/531 --- diff --git a/js/ui/dialog.js b/js/ui/dialog.js index 41a076353..553b81c78 100644 --- a/js/ui/dialog.js +++ b/js/ui/dialog.js @@ -177,8 +177,8 @@ var MessageDialogContent = GObject.registerClass({ let textProps = { ellipsize: Pango.EllipsizeMode.NONE, line_wrap: true }; - Object.assign(this._subtitle.clutter_text, textProps); - Object.assign(this._body.clutter_text, textProps); + this._subtitle.clutter_text.set(textProps); + this._body.clutter_text.set(textProps); if (!params.hasOwnProperty('style_class')) params.style_class = 'message-dialog-main-layout';